/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stcpscheculer;

/**
 *
 * @author HP
 */
public class Configuration {
    
    private static int Buses;   // number of Buses
    private static int Drivers; // number of Drivers
    private static int TimeSlot; // in hours
    private static int chromosomeLength; // calculated
    private static int Slots;
    
    public static Driver[] driversArr;
    public static Bus[] busesArr;

    // fa() weights
    private static float f1;
    private static float f2;
    private static float f3;
    private static float f4;
    private static float f5;

    
    private static int populationSize; // number of chromosomes in a population = 30.
    private static int maxGenerations; // max number of generations
    private static float desiredFA;    // desired value of fa()

    private static float Pcross; // probability of crossover
    private static float Pmut;   // probability of mutation
        
    public static void setDriversArr() {
        Configuration.driversArr = new Driver[Drivers];
    }

    public static void setBusesArr() {
        Configuration.busesArr = new Bus[Buses];
    }

    public static int getBuses() {
        return Buses;
    }

    public static void setBuses(int Buses) {
        Configuration.Buses = Buses;
    }

    public static int getDrivers() {
        return Drivers;
    }

    public static void setDrivers(int Drivers) {
        Configuration.Drivers = Drivers;
    }

    public static int getTimeSlot() {
        return TimeSlot;
    }

    public static void setTimeSlot(int TimeSlot) {
        Configuration.TimeSlot = TimeSlot;
    }

    public static int getChromosomeLength() {
        chromosomeLength = Drivers * (24 / TimeSlot);
        return chromosomeLength;
    }

    // not used
    public static void setChromosomeLength(int chromosomeLength) {
        Configuration.chromosomeLength = chromosomeLength;
    }

    public static int getSlots() {
        Slots = (int)(24 / TimeSlot);
        return Slots;
    }

    public static int getPopulationSize() {
        return populationSize;
    }

    public static void setPopulationSize(int populationSize) {
        Configuration.populationSize = populationSize;
    }

    public static float getF1() {
        return f1;
    }

    public static float getF2() {
        return f2;
    }

    public static float getF3() {
        return f3;
    }

    public static float getF4() {
        return f4;
    }

    public static float getF5() {
        return f5;
    }

    public static float getPcross() {
        return Pcross;
    }

    public static float getPmut() {
        return Pmut;
    }

    public static int getMaxGenerations() {
        return maxGenerations;
    }

    public static void setMaxGenerations(int maxGenerations) {
        Configuration.maxGenerations = maxGenerations;
    }

    // not used
    public static void setSlots(int Slots) {
        Configuration.Slots = Slots;
    }

    public static void setF1(float f1) {
        Configuration.f1 = f1;
    }

    public static void setF2(float f2) {
        Configuration.f2 = f2;
    }

    public static void setF3(float f3) {
        Configuration.f3 = f3;
    }

    public static void setF4(float f4) {
        Configuration.f4 = f4;
    }

    public static void setF5(float f5) {
        Configuration.f5 = f5;
    }

    public static void setPcross(float Pcross) {
        Configuration.Pcross = Pcross;
    }

    public static void setPmut(float Pmut) {
        Configuration.Pmut = Pmut;
    }

    public static float getDesiredFA() {
        return desiredFA;
    }

    public static void setDesiredFA(float desiredFA) {
        Configuration.desiredFA = desiredFA;
    }
    
        
}
